<?php @session_start(); 
//echo 'in';exit;
?>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="keywords" content="">
        <meta name="author" content="">
        <title>Product</title>
        <?php fnGetMeta(); ?>
        <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE; ?>css/payment.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE; ?>css/custom_product.css" />
        </head>
    <body class="activateAppearAnimation header3" style="padding-top:0px;">
        <!-- Primary Page Layout 
                ================================================== --> 
        <!-- globalWrapper -->
        <div id="globalWrapper" class="localscroll">
            <?php fnGetHeader(); ?>
            
            <section class="inner_banner">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-6">
                           
                            <ul id="navTrail">
                                <li><a href="<?php echo URL;?>">Home</a></li>
                                <li id="navTrailLast">Product</li>
                            </ul>
                        </div>
                        <div class="col-sm-6 hidden-xs"></div>
                    </div>
                </div>
            </section>
            <section class="titles">
    <div class="container">
      <h2><span>Get 24/7 Trusted PC Solution</span> Online from Trained Tech Experts through Secure Remote Access at TechOak</h2>
    </div>
  </section>
   <section>
  <div class="container">
    <div class="row">
      <div class="col-lg-3 mt15 ">
      
      	<div class="product-lists-links clearfix">
        	<h3>Category List</h3>
            <ul class="product-list-ul clearfix">
            	<?php
                foreach($this->category as $key =>$value):?>
                <li <?php if($this->category_name == $value['cat_alias']): echo 'class=selected_category';endif;?>>
                    <a href="<?php echo URL."product/".$value['cat_alias'];?>"><?php echo ucfirst($value['cat_name']);?></a>
                </li>
                <?php endforeach;?>
            </ul>
        
        </div><!--product-lists-links -->
       
          </div>
      <div class="col-lg-9 mt15 proudct-page">
        
          
         <div class="innerpage">
             <form method="post" action="<?php echo URL."product";?>">
                <div class="frm-ord">
                    <input type="text" value="<?php echo $_SESSION['search_key_word'];?>" class="odr-text" id="product_code" name="product_code" placeholder="Product Code" style="width: 20%">
                    <label class="s_code">&nbsp;</label>
                    <input type="submit" id="search_btn" value="Search" name="search_btn" class="product_search"> 
                </div>
                 <div style="float: right"><a href="<?php echo URL."cart";?>"><b>View Cart</b></a></div>
              </form>

             <div style="clear:both"></div>
            
         	<div class="product-listing-container">
            
            	<h3>Featured Product</h3>
                
                <div class="product-listing-div clearfix">
                	<ul class="prodcut-listing-ul clearfix">
                    	<?php  
                        $i=1;
                        if(count($this->product) > 0):
                        foreach ($this->product as $prd_key =>$prd_value):
                          if($prd_value['prd_image']!=""):
                              if(file_exists("admin/".$prd_value['prd_image'])):
                                  $src = URL."admin/".$prd_value['prd_image'];
                              else:
                                  $src = URL."img/images/default-product-image.jpg";
                              endif;
                              
                          else:
                              $src = URL."img/images/default-product-image.jpg";
                          endif;  
                            ?>
                            <li <?php if($i%3 == 0):echo "class = last "; endif;?>>
                                    <a href="<?php echo URL."product_listing/".$prd_value['prd_id'];?>">
                                        <div class="product-box">
                                            <div class="product-img"><img height="150" width="150"  src="<?php echo $src;?>" alt=""></div>
                                            <div class="product-txt">
                                                <p class="proudct-short-desc">
                                                    <?php
                                                        $product_name = ucfirst($prd_value['prd_name']) ;
                                                        echo substr($product_name, 0, 50)." (" . $prd_value['prd_code'] . ")";
                                                    ?>
                                                </p>
                                                <p class="product-price">$ <?php echo ucfirst(number_format($prd_value['prd_price'],2))?>
                                                <p class="buy-now-btn">
                                                    <a href="<?php echo URL."product_listing/".$prd_value['prd_id'];?>" class="buy-now-link" >View </a> </p>
													</p>
                                            </div>
                                        </div>
                                    </a>
                                </li>
                        <?php $i++;
                        endforeach;
                        else:
                            echo 'No Product Found';
                        endif;?>
                      
                    </ul>
                    
                    <!-- end of prodcut-listing-ul -->
                
                </div><!-- end of product-listing-div -->
                 <?php
                   if($this->category_name!=''):
                       $pagelink =URL.'product/'.$this->category_name ;
                   else:
                        $pagelink = URL.'product';
                   endif;
			
                 ?>
                <div class="pagination-bottom clearfix">
                	<div class="pagination">
                    	<?php echo pagination($this->statement,$this->limit,$this->page,$pagelink,'');?>
                        <!-- <a class="prev " data-ca-scroll=".cm-pagination-container"><i class="text-arrow">←</i>&nbsp;Prev</a>
                        <span class="pagination-selected-page">1</span>
                        <a data-ca-target-id="pagination_contents" class="pagination-page" data-ca-page="2" href="#" data-ca-scroll=".cm-pagination-container">2</a>
                        <span><a data-ca-target-id="pagination_contents" data-ca-page="2" href="#" class="next" data-ca-scroll=".cm-pagination-container">Next&nbsp;<i class="text-arrow">→</i></a></span>
                    -->
                        </div>
              </div><!-- end of pagination-bottom -->
                
            	
            </div><!-- end of product-listing-container -->
         
          
        </div>
        
      </div>
    </div>
  </div>
</div>
</section>

        
        <div id="contentBk" class="clearfix">
           <?php fnGetHmFooter(); ?>
    </body>
</html>